Video compression and decompression reduces the amount of data used to represent video images. The VC-1 video codec standard (also known as SMPTE 421M) is a type of video compression and decompression that is used by HD DVD, Blu-ray DVD, and the Windows Media Video 9, for example. When decoding compressed video according to the VC-1 standard, and when the Main Profile or Advanced Profile of Windows Media Video 9 is applied, the pixels making up horizontal and vertical edges between blocks in a video image may be in-loop filtered. The in-loop filtering eliminates pixel blockiness and other undesirable artifacts that may be caused by quantization and inverse discrete cosine transform operations performed during the video compression encoding process. In addition, the in-loop filtering may help make the overall video smoother and increase its picture quality.
In-loop filtering is performed inside the decoding loop for a block after the block has been reconstructed and before the block is used as a reference for motion predictive coding. In-loop filtering, as opposed to out-loop filtering, is specified by the VC-1 standard as a mandatory step inside the decoding loop. For pictures containing intra-coded blocks (I pictures) or bi-directional inter-coded blocks (B pictures), in-loop filtering occurs at every pixel row and column that is a multiple of eight. For pictures containing inter-coded blocks (P pictures), in-loop filtering is applied to every 8×8 block boundary of intra-coded blocks, and is applied to 8×8, 8×4, 4×8, and 4×4 block boundaries of inter-coded blocks, depending on their residual coefficient and motion vector conditions. In particular, the boundaries between coded (e.g., with at least one non-zero coefficient) 8×4, 4×8, or 4×4 sub-blocks within an 8×8 block are always filtered. The boundary between a block or sub-block and neighboring block or sub-block is not filtered if both have the same motion vector and both have no residual error (e.g., there are no transform coefficients); otherwise, both are filtered.
FIG. 1 shows a prior art representation of exemplary blocks 102 and 104 in a video image. Each of the blocks 102 and 104 is four pixels wide by four pixels high. The blocks 102 and 104 are separated by a horizontal edge 106. The pixels along the edge 106 are divided into segments 108 and 110 and may be filtered by an in-loop filter. According to the VC-1 standard, the third pixel pair 112 is filtered first, and the result of this filtering determines whether the remaining pixels in the segments 108 and 110 are filtered. The pixel luminance and/or chrominance values are updated after filtering. For example, if the results of filtering pixels P34 and P35 in the third pixel pair 112 meet predetermined criteria, then the pixels P14, P24, P44, P15, P25, and P45 in segments 108 and 110 would be filtered one at a time. However, if the result of filtering pixels P34 and P35 do not meet the predetermined criteria, then the remaining pixels in segments 108 and 110 are unchanged. The predetermined criteria may include whether the third pixel pair clip value is greater than zero. In addition, the intermediate values a0, a1, a2, and a3 from multi-tap filters applied to boundary pixels may be compared with each other and to a picture quantizer scale value PQUANT to decide the predetermined criteria. The PQUANT value may be constant for each block.
Similarly, FIG. 2 shows a prior art representation of exemplary blocks 202 and 204 in a video image. Each of the blocks 202 and 204 is four pixels wide by four pixels high. In contrast to FIG. 1, the blocks 202 and 204 in FIG. 2 are separated by a vertical edge 206. The pixels along the edge 206 are divided into segments 208 and 210. In the VC-1 standard, the third pixel pair 212 including pixels P43 and P53 is filtered first. If the results of the filtering meet predetermined criteria, the pixels P41, P42, P44, P51, P52, and P54 in segments 208 and 210 would then be filtered one at a time. However, if the result of filtering pixels P43 and P53 do not meet the predetermined criteria, then the remaining pixels in segments 208 and 210 are unchanged.
In conventional VC-1 decoding, such as shown in FIGS. 1 and 2, the in-loop filter may occupy a significant portion of the decoding process. As more computing resources and computation cycles are devoted to in-loop filtering in the decoding process, other tasks and operations may have a lower priority and power consumption may increase. Also, decoding video images may take longer and result in unsatisfactory performance if in-loop filtering takes up a large portion of the decoding process. Therefore, it would be desirable to provide faster in-loop filtering during decoding in the VC-1 standard that avoids these drawbacks.